package com.spring.service.impl;

import com.spring.dao.AccountDao;
import com.spring.service.AccountService;

import java.util.List;
import java.util.Map;
import java.util.Set;

public class AccountServiceImpl implements AccountService {
    private int price;
    private String style;

    public void setPrice(int price) {
        this.price = price;
    }

    public void setStyle(String style) {
        this.style = style;
    }

    private String desc;
    private String address;

    public AccountServiceImpl() {
    }

    public AccountServiceImpl(String desc, String address) {
        this.desc = desc;
        this.address = address;
    }

    private int id;
    private String name;
    private AccountDao accountDao = null;

    private String[] ss;
    private List<Integer> list;
    private Set<String> set;
    private Map<String,String > map;

    public void setSs(String[] ss) {
        this.ss = ss;
    }

    public void setList(List<Integer> list) {
        this.list = list;
    }

    public void setSet(Set<String> set) {
        this.set = set;
    }

    public void setMap(Map<String, String> map) {
        this.map = map;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAccountDao(AccountDao accountDao) {
        this.accountDao = accountDao;
    }


    @Override
    public void transfer(String sendUid, String receiveUid, int money) {
        accountDao.update1(sendUid, money);
        accountDao.update2(receiveUid, money);
    }
}
